﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Data;
using OgilvyOne.Model;
using OgilvyOne.DALFactory;

namespace OgilvyOne.BLL
{
    public class ICmsArticleComments
    {
        /// <summary>
        /// 添加评论
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int Add(CmsArticleCommentModel model)
        {
            return CmsArticleCommentsFactory.create().Add(model);
        }
        /// <summary>
        /// 取单个评论
        /// </summary>
        /// <returns></returns>
        public CmsArticleCommentModel GetArticleCommentModel(int commid)
        {
            return CmsArticleCommentsFactory.create().GetArticleCommentModel(commid);
        }
        /// <summary>
        /// 查询评论
        /// </summary>
        /// <param name="q"></param>
        /// <returns></returns>
        public DataSet GetCommentList(CmsArticleCommentModel q)
        {
            return CmsArticleCommentsFactory.create().GetCommentList(q);
        }
        public IList GetCommentList(int cid)
        {
            return CmsArticleCommentsFactory.create().GetCommentList(cid);
        }
        /// <summary>
        /// 审核评论
        /// </summary>
        /// <param name="commid">评论ID</param>
        /// <param name="auditstate">审核状态 2审核通过 3未通过</param>
        /// <param name="auditusername">审核人</param>
        /// <returns></returns>
        public bool Audit(int commid, int auditstate, string auditusername)
        {
            return CmsArticleCommentsFactory.create().Audit(commid, auditstate, auditusername);
        }
        /// <summary>
        /// 发布
        /// </summary>
        /// <param name="commid">评论ID</param>
        /// <param name="state">发布状态 1发布 6撤消发布 0等待审核</param>
        /// <returns></returns>
        public bool Pubsh(int commid, int state)
        {
            return CmsArticleCommentsFactory.create().Pubsh(commid, state);
        }
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="commid"></param>
        /// <returns></returns>
        public bool Delete(int commid)
        {
            return CmsArticleCommentsFactory.create().Delete(commid);
        }
        /// </summary>
        /// <param> 删除多条评论</param>
        /// <returns></returns>
        public bool DeleteComments(string CID)
        {
            return CmsArticleCommentsFactory.create().DeleteComments(CID);
        }
    }

}
